import request from '@/utils/wy'

// 轮播图
export interface FocusData{
    id: number,
    picUrl: string
}
export type FocusListData = FocusData[];

// 类目热销榜
export interface CategoryListData {
    categoryName: string,
    showPicUrl: string,
    picUrl: string
}                                                                                 
export type CategoryHotSellData = {
    title: string,
    categoryList: CategoryListData[]
}

// 新人专享礼
export interface IndexActivityData {
    activityPrice: string,
    originPrice: string,
    picUrl: string,
    showPicUrl: string,
    subTitle: string,
    targetUrl: string,
    title: string
}
// 分类列表
export type KingKongListData={
        
        picUrl: string,
        text: string,
}
// adv广告
export type PolicyDescListData={
    desc: string,
    icon: string
}
// main底部
export interface ItemPicData{
    itemId: number,
    picUrl: string
}
export type BannerData = {
    desc: string,
    picUrl: string,
    title: string,
    picUrlList?: string[],
    itemPicBeanList?: ItemPicData[]
}
export type SceneData = {
    styleBanner: BannerData,
    styleItem: BannerData
}
export type SceneLightShoppingGuideData = SceneData[]
// sales促销
export interface ItemData {
    id: number,
    picUrl: string
}
export type CellsData = {
    id: string,
    picUrl: string,
    itemList: ItemData[]
}
export type FloorListData = {
    cells: CellsData[]
}
export type BigPromData = {
    floorList: FloorListData[]
}
export type BigPromotionData = BigPromData

export type IndexInfoData = {
    data: {
        focusList: FocusListData, //轮播图
        categoryHotSellModule: CategoryHotSellData,// 类目热销榜
        indexActivityModule: IndexActivityData, //新人专享礼
        kingKongModule: KingKongListData, //分类列表
        policyDescList: PolicyDescListData, //adv广告
        sceneLightShoppingGuideModule: SceneLightShoppingGuideData, // main底部
        bigPromotionModule: BigPromotionData  //促销
    }
}


export default {
    // 推荐
    getIndex(){
        return request.get<any, IndexInfoData>('xhr/index.json?__timestamp=1662542610854&');
    }
}
